//
//  Common.h
//  CoolTennisBall
//
//  Created by Coollang on 16/7/19.
//  Copyright © 2016年 CoolLang. All rights reserved.
//

#import <UIKit/UIKit.h>


/// 返回当前iPhone OS 运行的版本
extern float OSVersion();

/// 返回应用屏幕大小
extern CGRect ApplicationBounds();

/// 返回状态栏的高度(横竖屏皆可)
extern CGFloat StatusBarHeight();

/// Disk Path
extern NSString *DocumentPath();
extern NSString *CachePath();
extern NSString *LibraryPath();
extern NSString *TempPath();

/// 如果obj为空, 则返回 @""
/// 如果不为空，则返回该obj的descrition
extern NSString *MapString(id obj);


//MARK: ----------------- GCD ------------------

extern dispatch_time_t yf_dispatch_time_delay(NSTimeInterval second);

/// 是否主线程
extern BOOL is_main_queue();
/// 异步主队列
extern void dispatch_async_main_queue(void (^block)());
/// 同步主队列
extern void dispatch_sync_main_queue(void (^block)());
/// 异步全局队列
extern void dispatch_async_glogle_queue(void (^block)());
/// 同步全局队列
extern void dispatch_sync_glogle_queue(void (^block)());
